<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .left {
      float: left;
    }

    .right {
      float: left;
    }
  </style>
</head>

<body>
  <div id="app">
    <ul>
      <li v-for="(item, index) in list" :key="item.id">
        <div class="left">
          <span>{{item.source}}</span>
          <span>{{item.time}}</span>
        </div>
        <div class="right">
          <img :src="item.img" alt="">
        </div>
      </li>
    </ul>
  </div>
  <script src="../vue.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
  <script>
    //https://hmajax.itheima.net/api/news

    //请求方式 get
    const app = new Vue({
      el: '#app',
      data: {
        list: []
      },
      async created() {
        const res = await axios.get('https://hmajax.itheima.net/api/news')
        this.list = res.data.data
      },
      methods: {
      }
    })
  </script>
</body>

</html>